/*
Kane and Anson
"Deficit Attention Disorder"
Political Behavior

Replication Files For:  MTurk Experiment

*/

************************************
*MTURK EXPERIMENT REPLICATION
************************************
use "Kane_Anson_ExpData_MTurk.dta"

ssc install blindschemes, replace all // install for "plotplain" scheme

*FIGURE 2 (TOP PANEL)
mean DVscale_01, over(Inparty_Outparty_Ind)
estimates store InOutIndmeans

coefplot InOutIndmeans, nolabels vertical recast(bar) barwidth(0.5) fcolor(*.5) xline(2.5) ///
ciopts(recast(rcap)) citop  scheme(plotplain) ///
ytitle("Perceived Importance of Addressing Deficit Spending") ///
coeflabels(c.DVscale_01@0.Inparty_Outparty_Ind= "Inparty Presidents" c.DVscale_01@1.Inparty_Outparty_Ind = "Outparty Presidents" ///
c.DVscale_01@2.Inparty_Outparty_Ind = "Republican Presidents" c.DVscale_01@3.Inparty_Outparty_Ind = "Democratic Presidents") //
*Note: Minor edits were manually made to the graph for aesthetic purposes


*FIGURE 2 (BOTTOM PANEL)
reg DVscale_01 i.Inparty_Outparty##c.LeanPartisanStrong // significant at p=.04
margins, dydx(Inparty_Outparty) at(LeanPartisanStrong=(0(1)2))

marginsplot, scheme(plotplain) legend(ring(0) pos(1)) ///
plotopts(mcolor(black)) ciopts(lcolor(black)) ///
title("")  ///
xtitle("") ///
xlabel(#3, valuelabel) xmtick(, nolabels noticks) ///
addplot(hist LeanPartisanStrong,  discrete barwidth(.1) gap(30) title( " ") ylabel(-.05(.01).15) ///
ytitle("Effect of Outparty President on" "Importance of Addressing Deficit Spending", size(small)) ///
xtitle("") ///
yaxis(2) yscale(alt axis(2)) percent ///
ylabel(0 "0%" 5 "5%" 10 "10%" 15 "15%" 20 "20%" 25 "25%" 30 "30%" 35 "35%" 40 "40%" 45 "45%" 50 "50%", labcolor(black*.9) axis(2)) ///
ytitle("Percent of Sample", axis(2) orientation(rvertical) size(small))  fcolor(white%10) lcolor(black*.5)) ///
legend(off) ///
xsize(6.5) ysize(4.5) ///
graphregion(margin(small))
*Note: Minor edits were manually made to the graph for aesthetic purposes


 
**SUPPLEMENTAL APPENDIX
 
 *TABLE A1
tabstat hh_income_clean age_clean female, st(mean p50 sd)
tab1 race_clean pid7_clean ideo_clean

 *TABLE C1 
 
 tab FMC_TR Treatment_RepDemPres if D0R1==0, col chi2 // Democrats
 tab FMC_TR Treatment_RepDemPres if D0R1==1, col chi2 // Republicans
 tab FMC_TR Treatment_RepDemPres if pid7_clean==4, col chi2 // Independents
 
 
 *TABLE C2
 
 *Top Question (MTurk Row)
 
 	*Democratic respondents
 tab FMC_TI1_R if D0R1==0 // Republican Presidents condition
 tab FMC_TI1_D if D0R1==0 // Democratic Presidents condition
 
	*Republican respondents
 tab FMC_TI1_R if D0R1==1 // Republican Presidents condition
 tab FMC_TI1_D if D0R1==1 // Democratic Presidents condition
 
	*Independent respondents
 tab FMC_TI1_R if pid7_clean==4 // Republican Presidents condition
 tab FMC_TI1_D if pid7_clean==4 // Democratic Presidents condition
 
  *Bottom Question (MTurk Row) 
 
 	*Democratic respondents
 tab FMC_TI2_R if D0R1==0 // Republican Presidents condition
 tab FMC_TI2_D if D0R1==0 // Democratic Presidents condition
 
	*Republican respondents
 tab FMC_TI2_R if D0R1==1 // Republican Presidents condition
 tab FMC_TI2_D if D0R1==1 // Democratic Presidents condition
 
	*Independent respondents
 tab FMC_TI2_R if pid7_clean==4 // Republican Presidents condition
 tab FMC_TI2_D if pid7_clean==4 // Democratic Presidents condition

 
*TABLE D1 (Top Portion)

reg DVscale_01 i.Inparty_Outparty // All partisans
reg DVscale_01 i.Inparty_Outparty if D0R1==0 // Democrats
reg DVscale_01 i.Inparty_Outparty if D0R1==1 // Republicans
reg DVscale_01 i.Treatment_RepDemPres if pid7_clean==4 // Indpendents

	*Non-significant interaction b/w treatment & party (cited in text)
reg DVscale_01 i.Inparty_Outparty##i.D0R1 // All partisans


*TABLE D2
reg DVscale_01 i.Inparty_Outparty##c.LeanPartisanStrong // All partisans
